﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewThread.aspx.cs" Inherits="InformationSystem.WebSite.Forum.NewThread" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>学生信息事务服务系统论坛</title>
    <link href="css/style_1_common.css" rel="stylesheet" type="text/css" />
    <link href="css/style_1_forum_post.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/mainstyle.css" />
    <link rel="Stylesheet" type="text/css" href="../css/jquery-ui-1.7.1.custom.css" />
    <!--[if IE 7]><link rel="stylesheet" href="../css/ie.css" type="text/css" media="screen, projection" /><![endif]-->
    <!--[if IE 6]><link rel="stylesheet" href="../css/ie6.css" type="text/css" media="screen, projection" /><![endif]-->
    <!--[if IE]>
		<style type="text/css">
		  .clearfix {
		    zoom: 1;     /* triggers hasLayout */
		    display: block;     /* resets display for IE/Win */
		    }  /* Only IE can see inside the conditional comment
		    and read this CSS rule. Don't ever use a normal HTML
		    comment inside the CC or it will close prematurely. */
		</style>
	<![endif]-->
    <!-- JavaScript -->
    <script type="text/javascript" src="../Scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../Scripts/jquery-ui-1.7.1.custom.min.js"></script>
    <script type="text/javascript" src="../Scripts/hoverIntent.js"></script>
    <script type="text/javascript" src="../Scripts/superfish.js"></script>
    <script type="text/javascript" src="../Scripts/excanvas.pack.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.flot.pack.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.markitup.pack.js"></script>
    <script type="text/javascript" src="../Scripts/set.js"></script>
    <script type="text/javascript" src="../Scripts/custom.js"></script>
    <script src="js/tiny_mce/tiny_mce.js" type="text/javascript"></script>
    <script type="text/javascript">
        tinyMCE.init({
            // General options
            language: "cn",
            mode: "textareas",
            //encoding: "html",
            theme: "advanced",
            //plugins: "autolink,lists,style,layer,advhr,advlink,inlinepopups,paste,directionality,noneditable,xhtmlxtras",
            // Theme options
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,forecolor,backcolor,|outdent,indent,|,link,unlink,code",
            theme_advanced_buttons2: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",

            theme_advanced_resizing: false,
            // Skin options     
            skin: "o2k7",
            skin_variant: "silver"
        }
     );

        function strLenCalc(obj, checklen, maxlen) {
            var v = obj.value, charlen = 0, maxlen = !maxlen ? 200 : maxlen, curlen = maxlen, len = strlen(v);
            for (var i = 0; i < v.length; i++) {
                if (v.charCodeAt(i) < 0 || v.charCodeAt(i) > 255) {
                    curlen -= 1;
                }
            }
            if (curlen >= len) {
                document.getElementById(checklen).innerHTML = curlen - len;
            } else {
                obj.value = mb_cutstr(v, maxlen, 0);
            }
        }
        function strlen(str) {
            // return (BROWSER.ie && str.indexOf('\n') != -1) ? str.replace(/\r?\n/g, '_').length : str.length;
            return str.length;

        }

        function mb_cutstr(str, maxlen, dot) {
            var len = 0;
            var ret = '';
            var dot = !dot ? '...' : dot;
            maxlen = maxlen - dot.length;
            for (var i = 0; i < str.length; i++) {
                len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? (charset == 'utf-8' ? 3 : 2) : 1;
                if (len > maxlen) {
                    ret += dot;
                    break;
                }
                ret += str.substr(i, 1);
            }
            return ret;
        }

    </script>
</head>
<body>
    <div class="container" id="container">
        <div id="header">
            <div id="profile_info" style="visibility:hidden">
                <img src="../img/avatar.jpg" id="avatar" alt="avatar" onclick="window.location('Panel.aspx?p=1')"
                    style="cursor: pointer" />
                <p>
                    欢迎&nbsp;<a href="../Panel.aspx?p=1">rzepak</a>&nbsp; &nbsp;在线人数:
                    <%=new Random().Next(10,100) %></p>
                <p>
                    <a href="#">修改密码</a> &nbsp; &nbsp;&nbsp; &nbsp <a href="#">注销</a></p>
                <p class="last_login">
                    最后登录时间:
                    <%=DateTime.Now.ToString("yyyy-MM-dd HH:mm") %></p>
            </div>
            <div id="logo">
                <h1>
                    <a href="/"></a></h1>
            </div>
        </div>
        <!-- end header -->
        <div id="content">
            <div id="top_menu" class="clearfix">
                <ul class="sf-menu">
                </ul>
                <div style="cursor: pointer;line-height: 16px;visibility:hidden" onclick='mywindow.show()'>
                    <a id="visit" class="right">关于/About</a></div>
            </div>
            <div class="section">
                <div id="pt" class="bm cl">
                    <div class="z">
                        <a href="/" class="nvhm" title="系统首页">系统首页</a> <em>&rsaquo;</em> <a href="./ForumList.aspx">
                            论坛首页 </a><em>&rsaquo;</em>发表帖子
                    </div>
                </div>
                <form method="post" runat="server" id="postform">
                <div id="ct" class="ct2_a ct2_a_r wp cl" style="width: 940px">
                    <div class="mn" style="width: 800px">
                        <div class="bm bw0 cl" id="editorbox">
                            <ul class="tb cl mbw">
                                <li class="a"><a href="javascript:;">发表帖子</a></li></ul>
                            <div id="postbox">
                                <div class="pbt cl">
                                    <div class="ftid">
                                        <select runat="server" name="typeid" id="typeid" style="width: 120px">
                                            <option value="0">选择主题分类</option>
                                        </select>
                                    </div>
                                    <div class="z">
                                        <span>
                                            <input runat="server" type="text" name="subject" id="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 80);"
                                                style="width: 25em" tabindex="1" /></span> <span id="subjectchk">还可输入 <strong id="checklen">
                                                    80</strong> 个字符</span>
                                    </div>
                                </div>
                                <div class="edt" id="e_body">
                                    <asp:TextBox ID="brand" Width="100%" Height="300" TextMode="MultiLine" runat="server" />
                                </div>
                                <div class="mtm mbm pnpost">
                                    <button type="submit" id="postsubmit" class="pn pnc" value="true" name="topicsubmit">
                                        <span>发表帖子</span>
                                    </button>
                                    <input type="hidden" id="postsave" name="save" value="" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="psd" class="appl" style="line-height: 1.5">
                        <h3 class="mbm pbm bbs">
                            附加选项</h3>
                        <div class="bn">
                            <p class="mbn">
                                <input runat="server" type="checkbox" name="anoreply" id="anoreply" class="pc" value="1" /><label
                                    for="smileyoff">匿名发表</label></p>
                            <p class="mbn">
                                <input runat="server" type="checkbox" name="canreply" id="canreply" class="pc" value="1" /><label
                                    for="bbcodeoff">禁止回复</label></p>
                            <p class="mbn">
                                <input runat="server" type="checkbox" name="cananoreply" id="cananoreply" class="pc" value="1" /><label
                                    for="bbcodeoff">允许匿名回复</label></p>
                        </div>
                    </div>
                </div>
                </form>
            </div>
            <!-- end #content -->
            <div id="footer" class="clearfix">
                <p class="left">
                    Power by 3161140 672598722</p>
                <p class="right">
                    © 2012 NJUST, Some Rights Reserved.</p>
            </div>
            <!-- end #footer -->
        </div>
    </div>
</body>
</html>
